#pragma once

typedef enum TEXT_ALIGN
{
    // private
    TEXT_ALIGN_LEFT = 1 << 0,
    TEXT_ALIGN_RIGHT = 1 << 1,
    TEXT_ALIGN_CENTER_H = 1 << 2,
    TEXT_ALIGN_TOP = 1 << 3,
    TEXT_ALIGN_BOTTOM = 1 << 4,
    TEXT_ALIGN_CENTER_V = 1 << 5,

    // public
    TEXT_ALIGN_CENTER_LEFT = TEXT_ALIGN_CENTER_V | TEXT_ALIGN_LEFT,
    TEXT_ALIGN_CENTER_RIGHT = TEXT_ALIGN_CENTER_V | TEXT_ALIGN_RIGHT,
    TEXT_ALIGN_CENTER_CENTER = TEXT_ALIGN_CENTER_V | TEXT_ALIGN_CENTER_H,
    TEXT_ALIGN_TOP_LEFT = TEXT_ALIGN_TOP | TEXT_ALIGN_LEFT,
    TEXT_ALIGN_TOP_RIGHT = TEXT_ALIGN_TOP | TEXT_ALIGN_RIGHT,
    TEXT_ALIGN_TOP_CENTER = TEXT_ALIGN_TOP | TEXT_ALIGN_CENTER_H,
    TEXT_ALIGN_BOTTOM_LEFT = TEXT_ALIGN_BOTTOM | TEXT_ALIGN_LEFT,
    TEXT_ALIGN_BOTTOM_RIGHT = TEXT_ALIGN_BOTTOM | TEXT_ALIGN_RIGHT,
    TEXT_ALIGN_BOTTOM_CENTER = TEXT_ALIGN_BOTTOM | TEXT_ALIGN_CENTER_H,
} TEXT_ALIGN;

typedef enum TRANSFORM_ORIGIN_TYPE
{
    TRANSFORM_ORIGIN_TYPE_KEYWORD,
    TRANSFORM_ORIGIN_TYPE_OFFSET,

} TRANSFORM_ORIGIN_TYPE;

typedef enum TRANSFORM_ORIGIN
{
    TRANSFORM_ORIGIN_LEFT = 0,
    TRANSFORM_ORIGIN_TOP = 0,
    TRANSFORM_ORIGIN_CENTER = 1,
    TRANSFORM_ORIGIN_RIGHT = 2,
    TRANSFORM_ORIGIN_BOTTOM = 2,
} TRANSFORM_ORIGIN;

struct transform_origin_t
{
    TRANSFORM_ORIGIN_TYPE type;

    union
    {
        TRANSFORM_ORIGIN keyword;
        double offset;
    } x, y;
};

typedef enum CSS_OVERFLOW
{
    CSS_OVERFLOW_VISIBLE = 0,
    CSS_OVERFLOW_HIDDEN = 1,
    CSS_OVERFLOW_SCROLL = 2,
    CSS_OVERFLOW_AUTO = 3,
} CSS_OVERFLOW;

#include <gen/style.h>

void box_default_style_init();
const box_style_t *box_default_style();